home *** CD-ROM | disk | FTP | other *** search
/ NOVA - For the NeXT Workstation / NOVA - For the NeXT Workstation.iso / SourceCode / Registration / README < prev    next >
Encoding:
Text File  |  1992-12-19  |  7.1 KB  |  161 lines

  1.             NeXTSTEP Registration Software
  2.         (C) 1992 Simson Garfinkel and Associates, Inc.
  3.  
  4. July 1, 1992
  5.  
  6.     A lot of NeXTSTEP developers are now bringing their products
  7. to market, and a plethora of registration systems seem to be poliferating.  Rather than force everybody to reinvent the wheel, I've decided to make public the registration software that we are using at SGAI.
  8.  
  9.     This software provides for two modes of operation, unregistered and registered.  Unregistered software can be run for 2 minutes, and then it stops running.  We like to think of this as our demo mode.
  10.     
  11.     There are two ways that software can be registered: for single-user use and for network-use.  If the software is registered for single-user use, the registration string is written into the user's defaults database.  If the software is licensed for network-use, the binary is branded --- you don't have to have every network user register themselves.
  12.     
  13.     What happens when the software starts up depends on how the user has registered.  If they have single-user registered, the software makes sure that nobody else on the subnet is using their single-user key.  If somebody is, it doesn't let the user run the program.  It also alerts the first person with that key that somebody else is using their registration number.  If the software is branded for network use, it counts the number of other copies of the program that are running on the subnet that have been running for a longer period of time.  If this number is larger than the maximum number of licensed users, the software refuses to run.
  14.     
  15.     One of the really neat things about our branding is that if you move the binary, the software is no longer branded.  So people can't take a copy of the software home from work and have it work.
  16.     
  17.     We've also implemented a true "demo mode."  This is for trade-shows.  You can brand the software with a demo key and the program will work.  You can move the binary.  But demo keys expire --- you can set when --- and then the software is no longer registered.
  18.     
  19.     SGAI is making this software freely available to all NeXTSTEP developers for use in NeXTSTEP programs, as long as we receive credit in that program, when the program is run, for having provided the registration software.
  20.  
  21.     The registration keys are encrypted with DES.  This means that different developers can use the same registration system without fear that we will be able to create keys for each other's programs.  However, because we use DES, there are export restrictions imposed by the US government, to wit:
  22.     
  23.     * You may not ship the source-code module des.c outside of the US or canada.
  24.     
  25.     * You may ship a program which uses the des.o compiled module outside of the United States to any type T or type V country as long as you do not provide cryptographic services to the user in your program and you clearly declare "commodity control number 5D11A" on your export declaration. Type T countries include all countries in the Western Hemisphere except Cuba. Type V countries include all countries in the Eastern Hemisphere except the previous communist block countries and the People's Republic of China, Vietnam, Cambodia, and Laos.
  26.     
  27.     I don't make up these rules, so please don't complain to me.  For further information, contact:
  28.     
  29.     Bureau of Export Administration
  30.     P.O. Box 273
  31.     Washington, DC 20044
  32.     202-377-2694
  33.     
  34.     By the way, don't violate these rules --- there's a maximum fine of $1,000,000 per violation, and 10 years in jail.
  35.     
  36.     
  37.     
  38.     ---Simson
  39.  
  40.  
  41. ============================================================
  42.  
  43.  
  44.  
  45. 1.    In one of your modules, insert the statements:
  46.  
  47. #define    PRODUCT_PASSWORD     "<apassword>"
  48. #define    PRODUCT_UDP_PORT    <aport>
  49. #define    PRODUCT_CODE        <acode>
  50. #import "../Registration/Registration.m"
  51.  
  52.  
  53. <apassword> should be your company password.  This is used to
  54. DES-encrypt your registration token strings.
  55.  
  56. <aport>    is your UDP port that you will be using for the Registration
  57. network protocol.  To get a pot, send e-mail to "jkrey@isi.edu" and
  58. ask for a UDP port for Simson Garfinkel's Registration Network
  59. Protocol.
  60.  
  61. <acode> is your product code.
  62.  
  63. 2.    Run the RegGen program.  Specify your product password and
  64. your product code.  Registration numbers will be provided at the
  65. bottom of the screen.
  66.  
  67. 3.    Don't forget to credit Simson Garfinkel and Associates, Inc.,
  68. in your Info Panel!
  69.  
  70.  
  71.  
  72.  
  73. ****************************************************************
  74. ****************************************************************
  75. ****************************************************************
  76. ****************************************************************
  77.  
  78.  
  79.  
  80.             Registration Network Protocol
  81.  
  82. 1. Message Type and format
  83.  
  84. All messages are in the form of single UDP packets.  The packet contains:
  85.  
  86.     byte    content
  87.     0    version number
  88.     1-11    User name of person running the application
  89.     12-76    Full name of person running the application
  90.     77-88    Encrypted license token
  91.     89-92    Session number (4 bytes, binary)
  92.     93-97    Time (number of seconds that the program has been running)
  93.     98    Command
  94.     99-    Command data
  95.  
  96. The following commands are implemented:
  97.  
  98. Command Code    Meaning
  99. 1        PING.  Send a PONG packet to the sender after 1-10 seconds.
  100. 2        PRINT.    Display the message in Command data on the
  101.         user's screen
  102. 3        PONG.  Response to a PING
  103.     
  104.  
  105. 2.  Message Practice
  106.  
  107.     The registration network protocol is based primarily on a
  108. UDP-broadcast system.
  109.  
  110.     A. When the user starts the application program, the program
  111. binds to a pre-defined UDP PORT.  If the program cannot bind, it
  112. terminates.
  113.  
  114.     B. After binding, the program transmits a UDP broadcast
  115. message with the PING command to the subnet.
  116.  
  117.     C. Each receiving host waits 1-10 seconds and then sends a
  118. PONG response to the sender.
  119.  
  120.  
  121.  
  122. 3.    Registration
  123.  
  124. Each license string contains the following encrypted information:
  125.  
  126.     <user accession number>
  127.     <license type: single-user or network>
  128.     <number of simultanious users for network license>
  129.  
  130. The application program monitors the application-specific Registration
  131. UDP port as part of its main event loop.  This responds to all
  132. PING/PONG requests.
  133.  
  134. If the user is operating with a single-user license and it gets a PING
  135. request with the same single-user license string, it displays an Alert
  136. panel notifying the user that someone else is using that user's
  137. license string.  The PONG response alerts the second user who starts
  138. up the program that somebody else is already using that license
  139. string, and stops the program from executing.
  140.  
  141. If the user is operating with a multi-user license, it looks at each
  142. PONG response it gets.  If the license-string has the same accession
  143. number, it then checks the time field to see which program has been
  144. running longer.  If the number of copies of the application program
  145. running longer than the reciving application program is larger than
  146. the number permitted, an Alert panel is displayed and the program
  147. ceases operating.
  148.  
  149. 4. Advantages
  150.  
  151. * This license strategy does not require a seperate "license server" to
  152. be running since the server is built into each application program.
  153.  
  154. * Network broadcasts are limited.  Replies are spaced out to avoid
  155. network congestion.
  156.  
  157. 5. Disadvantages
  158.  
  159. You only get lock-out of two copies of the program are being run on
  160. the same subnet.
  161.